package de.lulusoft.anothertorrent.core.rtorrent;

import java.io.Serializable;

public class TorrentCommand implements Serializable{

	private static final long serialVersionUID = 1745531380320801877L;
	
	private String name;
	private String command;
	private int id = 0;
	
	public TorrentCommand(String name, String command, int id) {
		super();
		this.name = name;
		this.command = command;
		this.id = id;
	}
	
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getCommand() {
		return command;
	}
	public void setCommand(String command) {
		this.command = command;
	}
	public String[] getCommandArray() {
		String[] cmds = command.split(",");
		for (int i=0; i<cmds.length; i++) {
			cmds[i] = cmds[i].trim();
		}
		return cmds;
	}

}
